home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group02b.txt
/
000060_icon-group-sender_Fri Oct 4 12:30:10 2002.msg
< prev
next >
Wrap
Internet Message Format
|
2003-01-02
|
4KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id g94JU7w11408
for icon-group-addresses; Fri, 4 Oct 2002 12:30:07 -0700 (MST)
Message-Id: <200210041930.g94JU7w11408@baskerville.CS.Arizona.EDU>
From: Andrew Shi-hwa Chen <chenandr@cse.msu.edu>
X-Newsgroups: comp.lang.icon
Subject: Re: Icon Wish List
Date: Fri, 04 Oct 2002 11:30:47 -0400
X-Accept-Language: en
To: icon-group@cs.arizona.edu
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
This is a multi-part message in MIME format.
--------------BD999B6AED3EAC0F935360F4
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
This sounds like how OO is done in LPC, which isn't really bad at all. I
rather like the one-file one-class model myself, but a big problem with
it is reloading if the file changes. Also, another big problem with it
is if people with Java backgrounds start using Icon, they'll want all
sorts of classes for all sorts of things (listeners, adaptors,
interfaces, etc...) and the code will bloat to the point where Icon will
look like a much more complicated Java.
I would recommend subclassing that's single-inheritence and inferred
from directory structure. A directory with a class of the same name in
it would be the parent class, child classes would have different names
(but in the same directory), grand children would be in a subdirectory,
etc.... Having both a file with a name (say "foo") and a directory with
that name and a file with that name in it (say "foo" with "foo" in it)
would be an error.
Why this way?
1) The file browser doubles as a class browser.
2) It promotes the use of class clusters a la Objective-C.
3) Similar to Java packages, it makes for a very clean and easy to
understand namespace organization.
But I would highly recommend against creating any kind of standard class
library or anything like that. Don't force OO on people that don't want
it - let them continue to use it as a scripting language if they want to
(a la Python) - let them code anything (GUI apps, etc...) without
needing to subclass this or that or whatever.
"Shmuel (Seymour J.) Metz" wrote:
>
> In <ambeg5$4gk5e$1@ID-79573.news.dfncis.de>, on 09/19/2002
> at 12:57 PM, "Andrew Hamm" <ahamm@mail.com> said:
>
> >Since Icon is completely free with variable types and call arguments,
> >it follows that class members should not be typed,
>
> No. The class is the type.
>
> >and overloaded methods do
> >not make sense either
>
> They make perfect sense if you allow subclasses and such.
>
> >one name, one method
>
> Too restrictive, and destroys some of the value of OO programming.
>
> >What about member privacy? With the 1 file, 1 class model, it does
> >become possible to add a "private" keyword for class methods,
> >members and statics. If marked as private, the member is not visible
> >outside the file. However, that does not fit at all with the dynamic
> >typing of Icon.
>
> Yes it does. Don't confuse the scope of the name with the lifetime of
> the object.
>
> >However,
> >that does not fit at all with the dynamic typing of Icon.
>
> It fits in perfectly. All that changes is that there are more possible
> types.
>
> >How do you know the type of a particular variable at any one time?
>
> The same way as in any other language with dynamic types.
>
> >To do this "properly" on UNIX, the compiler could probably write to
> >a tmp file (not linked into a directory) and then hand the open file
> >handles off to a cooperating iconx which can slurp up the icode from
> >the tmp file handles and then close them, resulting in their
> >deallocation.
>
> Bletch!
--
Andrew Chen
--------------BD999B6AED3EAC0F935360F4
Content-Type: text/x-vcard; charset=us-ascii;
name="chenandr.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andrew Shi-hwa Chen
Content-Disposition: attachment;
filename="chenandr.vcf"
begin:vcard
n:Chen;Andrew
x-mozilla-html:FALSE
url:http://www.cse.msu.edu/~chenandr/
org:Michigan State University;Computer Science and Engineering
version:2.1
email;internet:chenandr@cse.msu.edu
title:Teaching Assistant
adr;quoted-printable:;;3315 Engineering Building=0D=0Ac/o Computer Science Department;East Lansing;Michigan;48825;USA
x-mozilla-cpt:;0
fn:Andrew Chen
end:vcard
--------------BD999B6AED3EAC0F935360F4--